HatchShape AddEllipticalArc2D
Adds an 2D Elliptical Arc boundary to the HatchShape
Overloads
| public void AddEllipticalArc(float centerX, float centerY, float majorAxisLength, float majorAxisAngle, float ratioMinorMajor, float startAngle, float sweepAngle) |
| public void AddEllipticalArc(float centerX, float centerY, float majorAxisLength, float majorAxisAngle, float ratioMinorMajor, float startAngle, float sweepAngle, float maximumSegmentationError) |
Return value
| void |
Parameters
| float | centerX | The x coordinate of the center |
| float | centerY | The y coordinate of the center |
| float | centerZ | The z coordinate of the center |
| float | majorAxisLength | The length of the major axis |
| float | majorAxisAngle | Angle(radians) of the Major axis, relative to x direction CCW |
| float | ratioMinorMajor | Ratio, major axis length to minor axis length |
| float | startAngle | Starting angle(radians) of the arc measured from the major axis CCW. |
| float | sweepAngle | Sweep Angle(radian) of the Arc. |
| float | maxSegmentationError | Specifies the greatest deviation of a curve from a straight line segment between two points on the curve. |
| float | cutterCompensationWidth | Cutter compensation width to use |
Example
Copy
scanDocument = scanDeviceManager.CreateScanDocument(GetselectedDeviceUniqueName(), DistanceUnit.Millimeters, false);
if (scanDocument != null)
{
VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);
vectorImage.SetMarkSpeed(1000);
vectorImage.SetJumpSpeed(2000);
vectorImage.SetJumpDelay(100);
vectorImage.SetMarkDelay(100);
//Set Laser Delays
vectorImage.SetLaserOnDelay(10);
vectorImage.SetLaserOffDelay(10);
vectorImage.AddEllipticalArc(0, 0, 0, 10, 0, 3, 0, 120 * (float)(Math.PI / 180));
HatchShape hatchShape = new HatchShape();
hatchShape.AddEllipticalArc2D(0, 0, 10, 0, 3, 0, 120 * (float)(Math.PI / 180));
hatchShape.AddHatchPatternLine(1, HatchLineBorderGapDirection.Inward, 0.05f,
0, 0, 0, HatchLineStyle.Serpentine, true,
HatchOffsetAlgorithm.DirectOffset, HatchCornerStyle.Sharp);
vectorImage.AddHatch(hatchShape, 0);
scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));
try
{
scanDocument.StartScanning();
}
catch (Exception exp)
{
MessageBox.Show(exp.Message);
}
}